package com.example.myapplication.composite;

import java.util.ArrayList;
import java.util.List;

public class Employee {
    public Employee(String name, int salary) {
        this.name = name;
        this.salary = salary;
    }

    private ArrayList<Employee> list = new ArrayList();
    private String name;
    private int salary;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSalary() {
        return salary;
    }

    public void setSalary(int salary) {
        this.salary = salary;
    }

    public void addEmpolyee(Employee employee) {
        list.add(employee);
    }

    public void removeEmpolyee(Employee employee) {

    }

    public List<Employee> getSubordinate() {
        return list;
    }
}
